import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

import { RoleEnum } from '/@/enums/roleEnum';

const IFrame = () => import('/@/views/sys/iframe/FrameBlank.vue');

const route: AppRouteModule = {
  path: '/coreHome',
  name: 'CoreHome',
  component: LAYOUT,
  redirect: '/coreHome/index',
  meta: {
    orderNo: 1000000,
    icon: 'emojione:spouting-whale',
    title: t('routes.cn.core.coreHome.coreHome'),
    hideChildrenInMenu: true,
  },
  children: [
    {
      path: 'index',
      name: 'CoreHomePage',
      // component: () => import('/@/views/cn/core/coreHome/CoreHomePage.vue'),
      component: IFrame,
      meta: {
        affix: true,
        icon: 'emojione:spouting-whale',
        title: t('routes.cn.core.coreHome.coreHome'),
        frameSrc: 'http://moonnow.cn:9420/',
        ignoreKeepAlive: true,
        roles: [RoleEnum.coreHome],
      },
    },
  ],
};

export default route;
